import transforms3d as tf3d
import numpy as np

def quation_to_euler(q):
    euler = tf3d.euler.quat2euler(q, axes='sxyz')
    return euler

if __name__ == '__main__':
    q = np.array([0, 0, 0, 1])
    euler = quation_to_euler(q)
    print("quaternion: ", q)
    print("euler: ", euler)